/*
 ID: bqi3431
 PROG: lfence
 LANG: C++11
 */

#pragma GCC optimize ("O3")
#pragma GCC target ("sse4")

#include <bits/stdc++.h>
#include <ext/pb_ds/tree_policy.hpp>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/rope>

using namespace std;
using namespace __gnu_pbds;
using namespace __gnu_cxx;
 
typedef long long ll;
typedef long double ld;
typedef complex<ld> cd;

typedef pair<int, int> pi;
typedef pair<ll,ll> pl;
typedef pair<ld,ld> pd;

typedef vector<int> vi;
typedef vector<ld> vd;
typedef vector<ll> vl;
typedef vector<pi> vpi;
typedef vector<pl> vpl;
typedef vector<cd> vcd;

template <class T> using Tree = tree<T, null_type, less<T>, rb_tree_tag,tree_order_statistics_node_update>;

#define FOR(i, a, b) for (int i = (a); i < (b); i++)
#define F0R(i, a) for (int i = 0; i < (a); i++)
#define FORd(i,a,b) for (int i = (b)-1; i >= (a); i--)
#define F0Rd(i,a) for (int i = (a)-1; i >= 0; i--)
#define trav(a, x) for (auto& a : x)

#define mp make_pair
#define pb push_back
#define f first
#define s second
#define lb lower_bound
#define ub upper_bound

#define sz(x) (int)x.size()
#define beg(x) x.begin()
#define en(x) x.end()
#define all(x) beg(x), en(x)
#define resz resize

const int MOD = 1000000007;
const ll INF = 1e18;
const int MX = 100001;
const ld PI = 4*atan((ld)1);

template<class T> void ckmin(T &a, T b) { a = min(a, b); }
template<class T> void ckmax(T &a, T b) { a = max(a, b); }

namespace io {
    // TYPE ID (StackOverflow)
    
    template<class T> struct like_array : is_array<T>{};
    template<class T, size_t N> struct like_array<array<T,N>> : true_type{};
    template<class T> struct like_array<vector<T>> : true_type{};
    template<class T> bool is_like_array(const T& a) { return like_array<T>::value; }

    // I/O 
    
    void setIn(string s) { freopen(s.c_str(),"r",stdin); }
    void setOut(string s) { freopen(s.c_str(),"w",stdout); }
    void setIO(string s = "") {
        ios_base::sync_with_stdio(0); cin.tie(0);
        if (sz(s)) { setIn(s+".in"), setOut(s+".out"); }
    }
    
    // INPUT 
    
    template<class T> void re(T& x) { cin >> x; }
    template<class Arg, class... Args> void re(Arg& first, Args&... rest);
    void re(double& x) { string t; re(t); x = stod(t); }
    void re(ld& x) { string t; re(t); x = stold(t); }
    
    template<class T> void re(complex<T>& x);
    template<class T1, class T2> void re(pair<T1,T2>& p);
    template<class T> void re(vector<T>& a);
    template<class T, size_t SZ> void re(array<T,SZ>& a);
    
    template<class Arg, class... Args> void re(Arg& first, Args&... rest) { re(first); re(rest...); }
    template<class T> void re(complex<T>& x) { T a,b; re(a,b); x = cd(a,b); }
    template<class T1, class T2> void re(pair<T1,T2>& p) { re(p.f,p.s); }
    template<class T> void re(vector<T>& a) { F0R(i,sz(a)) re(a[i]); }
    template<class T, size_t SZ> void re(array<T,SZ>& a) { F0R(i,SZ) re(a[i]); }
    
    // OUTPUT 
    
    template<class T1, class T2> ostream& operator<<(ostream& os, const pair<T1,T2>& a) {
        os << '{' << a.f << ", " << a.s << '}'; return os;
    }
    template<class T> ostream& printArray(ostream& os, const T& a, int SZ) {
        os << '{';
        F0R(i,SZ) {
            if (i) {
                os << ", ";
                if (is_like_array(a[i])) cout << "\n";
            }
            os << a[i];
        }
        os << '}';
        return os;
    }
    template<class T> ostream& operator<<(ostream& os, const vector<T>& a) {
        return printArray(os,a,sz(a));
    }
    template<class T, size_t SZ> ostream& operator<<(ostream& os, const array<T,SZ>& a) {
        return printArray(os,a,SZ);
    }
    
    template<class T> void pr(const T& x) { cout << x << '\n'; }
    template<class Arg, class... Args> void pr(const Arg& first, const Args&... rest) { 
        cout << first << ' '; pr(rest...); 
    }
}

using namespace io;

int N;
vpi v;
vi nex[250], pre[250];
map<pi,int> m;
vpi rm;

template<int SZ> struct Topo {
    int N, in[SZ];
    vi res, adj[SZ];
    
    void addEdge(int x, int y) {
        adj[x].pb(y), in[y] ++;
    }
    
    void sort() {
        queue<int> todo;
        F0R(i,N) if (in[i] == 0) todo.push(i);
        while (sz(todo)) {
            int x = todo.front(); todo.pop();
            res.pb(x);
            for (int i: adj[x]) {
                in[i] --;
                if (!in[i]) todo.push(i);
            }
        }
    }
};

struct graph {
    vpi adj[250*250];
    Topo<250*250> T = Topo<250*250>();
    int dp[250*250];
    
    void addEdge(int a, int b, int c) {
        adj[a].pb({b,c});
    }
    
    void gen() {
        T.N = sz(m);
        F0R(i,sz(m)) trav(j,adj[i]) T.addEdge(i,j.f);
        T.sort();
    }
    
    vi genDist(int a) {
        F0R(i,sz(m)) dp[i] = -MOD;
        vi ans(N,-MOD);
        trav(i,T.res) {
            if (rm[i].f == a) ckmax(dp[i],1);
            trav(j,adj[i]) ckmax(dp[j.f],dp[i]+j.s);
            ckmax(ans[rm[i].s],dp[i]);
        }
        return ans;
    }
};

graph G[2];

pi operator-(const pi& l, const pi& r) {
    return {l.f-r.f,l.s-r.s};
}

pi operator -=(pi& l, const pi& r) {
    return l = l-r;
}

bool cw(pi a, pi b, pi c) {
    b -= a, c -= a;
    return b.s*c.f-b.f*c.s > 0;
}

int get(int a, int b) {
    pi p = {a,b};
    if (!m.count(p)) {
        int t = sz(m);
        m[p] = t; rm.pb(p);
    }
    return m[p];
}

int main() {
    // you should actually read the stuff at the bottom
    setIO("lfence"); 
    re(N); v.resz(N); re(v); sort(all(v));
    F0R(i,sz(v)) FOR(j,i+1,sz(v)) {
        nex[i].pb(j);
        pre[j].pb(i);
    }
    F0R(i,N) {
        int ind = 0;
        sort(all(nex[i]),[i](int a, int b) { return cw(v[i],v[a],v[b]); });
        sort(all(pre[i]),[i](int a, int b) { return cw(v[i],v[a],v[b]); });
        F0R(j,sz(nex[i])-1) {
            G[0].addEdge(get(i,nex[i][j]),get(i,nex[i][j+1]),0);
            G[1].addEdge(get(i,nex[i][j+1]),get(i,nex[i][j]),0);
        }
        /*cout << v[i] << " | ";
        trav(x,nex[i]) cout << v[x] << " ";
        cout << " | ";
        trav(x,pre[i]) cout << v[x] << " ";
        pr("");*/
        trav(x,pre[i]) {
            while (ind < sz(nex[i]) && !cw(v[x],v[i],v[nex[i][ind]])) ind ++;
            if (ind < sz(nex[i])) G[0].addEdge(get(x,i),get(i,nex[i][ind]),1);
            if (ind > 0) G[1].addEdge(get(x,i),get(i,nex[i][ind-1]),1);
            // pr(x,ind);
        }
    }
    G[0].gen(), G[1].gen();
    // pr(v);
    int ans = 0;
    F0R(i,N) {
        vi a = G[0].genDist(i), b = G[1].genDist(i);
        // if (i == 1) pr(a,b);
        F0R(j,N) ckmax(ans,a[j]+b[j]);
    }
    pr(ans);
    // you should actually read the stuff at the bottom
}

/* stuff you should look for
    * int overflow, array bounds
    * special cases (n=1?), set tle
    * do smth instead of nothing and stay organized
*/
